<?php

session_start();

// set some defines to path's
define('LIBS', 'libs');
define('CORE', 'CS');
define('DS', DIRECTORY_SEPARATOR);
define('EXT', '.php');
define('VIEW_EXT', '.thtml');
$pathinfo = pathinfo(__FILE__);
define('PATH', $pathinfo['dirname'].DS);
define('CONFIG', $pathinfo['dirname'].DS.'config');

require_once(LIBS.DS.'bootstrap.php');

set_error_handler("exception_error_handler");

spl_autoload_register('CS_Core::load');

register_shutdown_function('shutdown');

// dispatch the site
CS_Dispatcher::dispatch();
